package com.xyw.code.platform.common.entity.enums;

import com.xyw.code.common.core.exception.ErrorType;

/**
 * Created with IntelliJ IDEA.
 * User: xuyiwei
 * Date: 2020/5/28
 * Time: 上午9:47
 * Email: 1328312923@qq.com
 * Description: No Description
 **/
public enum PlatformErrorType implements ErrorType {
    PHONE_REPEAT("A000001", "手机号重复"),
    ORIGINAL_PASSWORD_ERROR("A000002", "原密码错误"),
    PASSWORD_SAME("A000003", "新老密码不能相同"),
    VERIFICATION_CODE_NULL("A000004", "验证码不能为空"),
    VERIFICATION_CODE_INVALID("A000005", "验证码已过期"),
    VERIFICATION_CODE_ERROR("A000006", "验证码错误"),
    PARENT_IS_ONLY_CATALOG("A000007", "上级菜单只能为目录类型"),
    PARENT_IS_ONLY_MENU("A000008", "上级菜单只能为菜单类型"),

    ;
    private String code;
    private String msg;

    PlatformErrorType(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    @Override
    public String getCode() {
        return code;
    }

    @Override
    public String getMsg() {
        return msg;
    }
}
